package main

import (
	"fmt"
	"time"
)

func task1(ch chan<- string) {
	time.Sleep(2)
	ch <- "task1"
}

func task2(ch chan<- string) {
	time.Sleep(2)
	ch <- "task2"
}

func main() {
	output1 := make(chan string)
	output2 := make(chan string)

	go task1(output1)
	go task2(output2)

	select {
	case s1 := <-output1:
		fmt.Println("s1= ", s1)
	case s2 := <-output2:
		fmt.Println("s2= ", s2)
	}
}
